<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<html>

<head>
    <title>Title</title>
    <script src="js/jquery-3.3.1.js" type="text/javascript"></script>
</head>

<body>
<script>
    var userList = new Array();
    userList.push({username: "zhangsan", age: 15})
    userList.push({username: "wangwu", age: 62})
    userList.push({username: "fdasjif", age: 45})

    console.log(userList)

    $.ajax({
        type: "POST",
        url: "${pageContext.request.contextPath}/user/test14",
        data: JSON.stringify(userList),
        contentType: "application/json;charset=utf-8"
    })


    <%--$.get("${pageContext.request.contextPath}/user/test14", JSON.stringify(userList), function (data) {--%>
    <%--    alert(data)--%>
    <%--}, "application/json;charset=utf-8")--%>

</script>
</body>

</html>
